  //登陆界面
  var box1 = document.querySelector(".container1");
  //注册界面
  var box2 = document.querySelector(".container2");
  //获得去注册的按钮
  var toRegister = document.getElementById("toRegister");
  //获得返回登陆界面的按钮
  var toSign = document.getElementById("toSign");


  // 按钮切换页面的事件
  toRegister.addEventListener("click", function () {
    box1.style.transition = "1s";
    box1.style.opacity = "0";

    box2.style.transition = "1s";
    box2.style.opacity = "1";

    box1.style.top = "-1300px";
    box2.style.top = "-350px";

    box1.style.zIndex = "1";
    box2.style.zIndex = "2";


  });

  toSign.addEventListener("click", function () {
    box2.style.top = "-1300px";
    box1.style.top = "-300px";

    box2.style.zIndex = "1";
    box1.style.zIndex = "2";

    box1.style.opacity = "1";
    box2.style.opacity = "0";
    
   
  });